﻿Public Class ItemTypeControl

#Region "UI Events"

    Private Sub ItemTypeBox_Load(sender As Object, e As System.EventArgs) Handles Me.Load

        ResizeAllInnerControls()

    End Sub

    Private Sub ItemTypeBox_Resize(sender As Object, e As System.EventArgs) Handles Me.Resize

        ResizeAllInnerControls()

    End Sub

#End Region

#Region "Design wrapper functions"

    Private Sub ResizeAllInnerControls()

        ResizeComponent100Percent(GroupBox)
        ResizeComponent100Percent(TreeView)

    End Sub

    Private Sub ResizeComponent100Percent(innerControl As Control)

        innerControl.Width = innerControl.Parent.Width - innerControl.Parent.Padding.Left - innerControl.Parent.Padding.Right - innerControl.Left
        innerControl.Height = innerControl.Parent.Height - innerControl.Parent.Padding.Top - innerControl.Parent.Padding.Bottom - innerControl.Top

    End Sub

#End Region

End Class
